package Server;

import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;

import Interface.TDAManejoDatos;
import RMI.GestionLogisticaCentral;
import SRV.ClienteSRV;

public class Server 
{
	public static void main(String[] args)
	{
		new Server();
	}
		     
	public Server() 
	{
		iniciar();
	}
		
    public void iniciar() 
    {
    	try 
    	{
    		LocateRegistry.createRegistry(1099);
    		TDAManejoDatos admCentral = GestionLogisticaCentral.getInstancia();
            Naming.rebind ("//localhost/GestionLogisticaCentral", admCentral);
            System.out.println("Fijado en //localhost/GestionLogisticaCentral");
		} 
    	catch (Exception e) 
    	{
			e.printStackTrace();
		}
    }
    
}

